@extends("admin_system/public/layout")

@section('content')
    <div class="col-xs-12 top-nav nav">
        <p class="float-left nav-path"><strong>当前位置：</strong>666活动>>订单列表</p>

        {{--返回按钮--}}
        <button type="button" class="btn btn-default float-right back ml10" aria-label="Left Align">
            <span class="glyphicon glyphicon-arrow-left back" aria-hidden="true"></span>
            <span>返回</span>
        </button>
    </div>

    <div class="content-box col-xs-12 mt20 pb20 pt20">

        <form class="form-inline nav mb10" method="post" action="{{asset('admin_system/666active/enter?fun=orders')}}">
            <div class="form-group">
                <div class="input-group">
                    <div class="input-group-addon">查询</div>
                    <select name="isSuccess" class="form-control">
                        <option value="-1" @if($isSuccess == -1) selected @endif >全部</option>
                        <option value="0" @if($isSuccess == 0) selected @endif>未完成</option>
                        <option value="1" @if($isSuccess == 1) selected @endif>已完成</option>
                    </select>
                    {{csrf_field()}}
                </div>
            </div>
            <button type="submit" class="btn btn-primary">搜索</button>
        </form>

        <table class="table table-hover table-bordered">
            <tr>
                <th>编号</th>
                <th>姓名</th>
                <td>微信名</td>
                <td>管理员</td>
                <td>电话</td>
                <td>完成时间</td>
                <td>已筹金额</td>
                <td>创建时间</td>

                <th>操作</th>
            </tr>

            @foreach($orders as $key=>$order)
                <tr>
                    <td>{{($orders->currentPage()-1) * $orders->perPage() + $key + 1 }}</td>
                    <td>{{$order->real_name}}</td>
                    <td>{{$order->wx_name}}</td>
                    <td>{{$order->manager_name}}</td>
                    <td>{{$order->mobile}}</td>
                    <td>{{$order->success_time}}</td>
                    <td>{{$order->raised_money}}</td>
                    <td>{{$order->created_at}}</td>
                    <td>
                        {{--<a href="{{asset('admin_system/666active/enter?fun=orders&managerId='.$order->id)}}" class="btn btn-xs btn-info">查看订单</a>--}}
                        {{--<a href="{{asset('admin_system/666active/enter?fun=edit_manager&managerId='.$order->id)}}" class="btn btn-xs btn-info">编辑</a>--}}
                        <a href="{{asset('admin_system/666active/enter?fun=delete_order&orderId='.$order->id)}}" class="btn btn-xs btn-danger" onclick="return confirm('确定彻底删除？')">删除</a>
                    </td>
                </tr>
            @endforeach
        </table>

        {!! $orders->appends(['keywords'=>'','fun'=>'orders'])->links() !!}

    </div>
@endsection